" ================================================================
"                          SET OPTIONS
" ================================================================
" indent new lines
set autoindent
" set directory for temporary files to be saved
set dir=/tmp
" extended regex
set extended
" do not show line, column and current position down below
set noruler
" don't wrap after the last search entry
set nowrapscan
" show line number to the left
"set number
" show current mode and a 'modified' flag
"set showmode
" set tab width
set tabstop=2
" break line on 72 chars
set wraplen=72
" ================================================================
"                          MAP OPTIONS
" ================================================================
" NOTICE: shell commands have ^V^M special chars at the EOL so you
" don't have to press <return> all the time
" ================================================================
" enter ex mode without holding down shift button
map ; :
" diff current file with buffer
map ,d :w !diff -u % -
" jump to the beginning of the file
map gg 1G
" use checkshell on current file
map ,s :!clear && shellcheck %
" trim trailing whitespaces and tabs & replace tabs with 2 spaces
" (notabug.org treats carriage returns as explicit newlines, therefore
" the following sequence of commands is split into several different
" lines by notabug, while it's technically a single line on my end)
map ,t mC:%s/ *$//:%s/	*$//:%s/	/\ \ /g`C
